<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>dinic: Referencia del Archivo network.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generado por Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Página&nbsp;principal</span></a></li>
      <li><a href="annotated.html"><span>Estructuras&nbsp;de&nbsp;Datos</span></a></li>
      <li class="current"><a href="files.html"><span>Archivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Buscar" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;archivos</span></a></li>
      <li><a href="globals.html"><span>Globales</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Referencia del Archivo network.c</h1><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="plist_8h_source.html">plist.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="network_8h_source.html">network.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="edge_8h_source.html">edge.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="node_8h_source.html">node.h</a>&quot;</code><br/>
<code>#include &lt;err.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="uthash_8h_source.html">uthash.h</a>&quot;</code><br/>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Estructuras de datos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structs__network.html">s_network</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Esta estructura representa un network.  <a href="structs__network.html#_details">Más...</a><br/></td></tr>
<tr><td colspan="2"><h2>Definiciones</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>(a, b)&nbsp;&nbsp;&nbsp;( ((a) &lt; (b)) ? (a) : (b) )</td></tr>
<tr><td colspan="2"><h2>Funciones</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs__network.html">network</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a97c96bf40a819b157ef8b31fececf37c">network_create</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Crea un network.  <a href="#a97c96bf40a819b157ef8b31fececf37c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs__node.html">node</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a2b3eb1780fd3a3bb2e8bc4ce0d2b2111">network_find</a> (<a class="el" href="structs__network.html">network</a> n, unsigned int name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Busca y devuelve un nodo del network.  <a href="#a2b3eb1780fd3a3bb2e8bc4ce0d2b2111"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#aea520777368475fc907f17ffa04fad20">network_add</a> (<a class="el" href="structs__network.html">network</a> n, unsigned int from, unsigned int to, unsigned int cap, unsigned int flow)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creador del network.  <a href="#aea520777368475fc907f17ffa04fad20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a1d0a12cd9f951144f131dc6894830e3f">network_destroy</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor del network.  <a href="#a1d0a12cd9f951144f131dc6894830e3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#ab2372efbda2c5190b59830c542664486">network_helper_add</a> (<a class="el" href="structs__network.html">network</a> n, unsigned int from, unsigned int to, unsigned int cap, unsigned int flow, bool backward)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creador del network.  <a href="#ab2372efbda2c5190b59830c542664486"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs__network.html">network</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#ad7d6d9c8dc50e53db53a6ef90f6cfc47">network_helper_create</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Crea un network auxiliar.  <a href="#ad7d6d9c8dc50e53db53a6ef90f6cfc47"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a44e1046474cc7dc6b61b8cdbe69e3987">network_path_exists</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indica si hay un camino en el network hasta t.  <a href="#a44e1046474cc7dc6b61b8cdbe69e3987"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a70c878ee2e5d2444becc67d5387670a5">network_cut_calculate</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imprime el corte en un network auxiliar en el archivo "cut.txt".  <a href="#a70c878ee2e5d2444becc67d5387670a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a65764acdf437b05dd7114a8c8a18ecb1">network_flow_calculate</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Imprime el flujo total en el archivo "flow.txt".  <a href="#a65764acdf437b05dd7114a8c8a18ecb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a7725b0bfc7daf898e7910cfc9574dcc6">network_max_flow_calculate</a> (<a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calcula el flujo máximo, es decir la sumatoria de los flujos que salen de s.  <a href="#a7725b0bfc7daf898e7910cfc9574dcc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a6a370f298d1f6643f4e389cbd42dc684">network_increase_flow</a> (<a class="el" href="structplist__s.html">plist_t</a> path, <a class="el" href="structs__network.html">network</a> n, unsigned int min_flow)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Incrementa el flujo de las aristas que estan en path en una cantidad min_flow para el network n.  <a href="#a6a370f298d1f6643f4e389cbd42dc684"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="network_8c.html#a4770455eb72b3cbb6843ac24eae0371d">network_helper_increase_flow</a> (<a class="el" href="structplist__s.html">plist_t</a> path, <a class="el" href="structs__network.html">network</a> n)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Incrementa el flujo de las aristas que estan en path.  <a href="#a4770455eb72b3cbb6843ac24eae0371d"></a><br/></td></tr>
</table>
<hr/><h2>Documentación de las definiciones</h2>
<a class="anchor" id="ac6afabdc09a49a433ee19d8a9486056d"></a><!-- doxytag: member="network.c::min" ref="ac6afabdc09a49a433ee19d8a9486056d" args="(a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define min</td>
          <td>(</td>
          <td class="paramtype">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;( ((a) &lt; (b)) ? (a) : (b) )</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Funcion minimo </p>

</div>
</div>
<hr/><h2>Documentación de las funciones</h2>
<a class="anchor" id="aea520777368475fc907f17ffa04fad20"></a><!-- doxytag: member="network.c::network_add" ref="aea520777368475fc907f17ffa04fad20" args="(network n, unsigned int from, unsigned int to, unsigned int cap, unsigned int flow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>cap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>flow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creador del network. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network al que le vamos a agregar los nodos y aristas. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from</em>&nbsp;</td><td>El nombre del nodo origen. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>El nomre del nodo destino. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cap</em>&nbsp;</td><td>La capacidad de a arista. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flow</em>&nbsp;</td><td>El flujo de la arista. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a97c96bf40a819b157ef8b31fececf37c"></a><!-- doxytag: member="network.c::network_create" ref="a97c96bf40a819b157ef8b31fececf37c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_create </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Crea un network. </p>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>Un nuevo network. </dd></dl>

</div>
</div>
<a class="anchor" id="a70c878ee2e5d2444becc67d5387670a5"></a><!-- doxytag: member="network.c::network_cut_calculate" ref="a70c878ee2e5d2444becc67d5387670a5" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_cut_calculate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Imprime el corte en un network auxiliar en el archivo "cut.txt". </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>nh</em>&nbsp;</td><td>El network auxiliar del cual queremos calcular el corte </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1d0a12cd9f951144f131dc6894830e3f"></a><!-- doxytag: member="network.c::network_destroy" ref="a1d0a12cd9f951144f131dc6894830e3f" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor del network. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network que queremos destruir. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2b3eb1780fd3a3bb2e8bc4ce0d2b2111"></a><!-- doxytag: member="network.c::network_find" ref="a2b3eb1780fd3a3bb2e8bc4ce0d2b2111" args="(network n, unsigned int name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_find </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Busca y devuelve un nodo del network. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network en el que vamos a buscar el nodo </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>El nombre del nodo a buscar. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>El nodo o NULL si no esta. </dd></dl>

</div>
</div>
<a class="anchor" id="a65764acdf437b05dd7114a8c8a18ecb1"></a><!-- doxytag: member="network.c::network_flow_calculate" ref="a65764acdf437b05dd7114a8c8a18ecb1" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_flow_calculate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>nh</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Imprime el flujo total en el archivo "flow.txt". </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network del cual queremos imprimir el flujo. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab2372efbda2c5190b59830c542664486"></a><!-- doxytag: member="network.c::network_helper_add" ref="ab2372efbda2c5190b59830c542664486" args="(network n, unsigned int from, unsigned int to, unsigned int cap, unsigned int flow, bool backward)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_helper_add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>cap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>flow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>flow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creador del network. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network auxiliar al que le vamos a agregar los nodos y aristas. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>from</em>&nbsp;</td><td>El nombre del nodo origen. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>to</em>&nbsp;</td><td>El nomre del nodo destino. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cap</em>&nbsp;</td><td>La capacidad de a arista. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flow</em>&nbsp;</td><td>El flujo de la arista. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>backward</em>&nbsp;</td><td>Para indicar si agregamos la arista en backward. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad7d6d9c8dc50e53db53a6ef90f6cfc47"></a><!-- doxytag: member="network.c::network_helper_create" ref="ad7d6d9c8dc50e53db53a6ef90f6cfc47" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_helper_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Crea un network auxiliar. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network que queremos destruir. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>El network auxiliar. </dd></dl>

</div>
</div>
<a class="anchor" id="a4770455eb72b3cbb6843ac24eae0371d"></a><!-- doxytag: member="network.c::network_helper_increase_flow" ref="a4770455eb72b3cbb6843ac24eae0371d" args="(plist_t path, network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_helper_increase_flow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structplist__s.html">plist_t</a>&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Incrementa el flujo de las aristas que estan en path. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd>
<dd>
<code> (path != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>El camino de aristas de s a t en las que hay que aumentar el flujo </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network en el que queremos aumentar el flujo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>La cantidad de flujo que el camino aumento. </dd></dl>

</div>
</div>
<a class="anchor" id="a6a370f298d1f6643f4e389cbd42dc684"></a><!-- doxytag: member="network.c::network_increase_flow" ref="a6a370f298d1f6643f4e389cbd42dc684" args="(plist_t path, network n, unsigned int min_flow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_increase_flow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structplist__s.html">plist_t</a>&nbsp;</td>
          <td class="paramname"> <em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>min_flow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Incrementa el flujo de las aristas que estan en path en una cantidad min_flow para el network n. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd>
<dd>
<code> (path != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>path</em>&nbsp;</td><td>El camino de aristas de s a t en las que hay que aumentar el flujo </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min_flow</em>&nbsp;</td><td>La cantidad de flujo que puede enviar el camino </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network en el que queremos aumentar el flujo </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7725b0bfc7daf898e7910cfc9574dcc6"></a><!-- doxytag: member="network.c::network_max_flow_calculate" ref="a7725b0bfc7daf898e7910cfc9574dcc6" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int network_max_flow_calculate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>n</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calcula el flujo máximo, es decir la sumatoria de los flujos que salen de s. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (n != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network en el que queremos calcular el flujo máximo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>El flujo máximo del network. </dd></dl>

</div>
</div>
<a class="anchor" id="a44e1046474cc7dc6b61b8cdbe69e3987"></a><!-- doxytag: member="network.c::network_path_exists" ref="a44e1046474cc7dc6b61b8cdbe69e3987" args="(network n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">network_path_exists </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structs__network.html">network</a>&nbsp;</td>
          <td class="paramname"> <em>nh</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Indica si hay un camino en el network hasta t. </p>
<dl class="pre"><dt><b>Precondición:</b></dt><dd><code> (nh != NULL) </code> </dd></dl>
<dl><dt><b>Parámetros:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>El network en el que queremos saber si hay camino. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Devuelve:</b></dt><dd>Verdadero si hay un camino hacia t. </dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Estructuras de Datos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Tipos definidos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Definiciones</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generado el Mon Jun 6 20:15:28 2011 para dinic por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
